package yang.learn.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import yang.learn.dao.ChatRoomFriendDao;
import yang.learn.entity.ChatRoom;
import yang.learn.entity.ChatRoomFriend;
import yang.learn.entity.User;
import yang.learn.service.ChatRoomFriendService;

import java.util.List;
@Service
public class ChatRoomFriendServiceImpl implements ChatRoomFriendService {

    @Autowired(required = false)
    private ChatRoomFriendDao chatRoomFriendDao;

    @Override
    public void add(ChatRoomFriend chatRoomFriend) {
        chatRoomFriendDao.add(chatRoomFriend);
    }

    @Override
    public void del(ChatRoomFriend chatRoomFriend) {
        chatRoomFriendDao.del(chatRoomFriend);
    }

    @Override
    public List<ChatRoomFriend> queryAll(ChatRoom chatRoom) {
        return chatRoomFriendDao.queryAll(chatRoom);
    }

    @Override
    public List<ChatRoomFriend> queryAccount(User user) {
        return chatRoomFriendDao.queryAccount(user);
    }
}
